package com.hqj.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author 黄啟军
 * @version 1.0
 * @date 2020/8/2 0002
 */
@Data
@TableName(value="comment")
public class Comment {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String username;
    private Integer likes;
    private Long parentId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:ss")
    private Date createBy;
    private Long blogId;
    private String content;
    @TableField(exist = false)
    private List<Comment> commentList;
    @ApiModelProperty("用户头像")
    private String userImg;
    @ApiModelProperty("@谁")
    private String revert;
}
